package com.anuo.app.modules.venue.service;

import com.anuo.app.modules.venue.dao.VenueDao;
import com.anuo.app.modules.venue.entity.Venue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class VenueService {
    @Autowired
    VenueDao venueDao;

    @Transactional(readOnly = false)
    public void saveVenue(Venue venue) {
        venue.preInsert();
        venueDao.insertVenue(venue);
    }

    @Transactional(readOnly = true)
    public Venue getVenue(Venue venue) {
        return venueDao.getVenue(venue);
    }

}
